package script;

import org.graalvm.polyglot.Context;

public class ScriptEngineTest2 {
    public static void main(String[] args) {
        try (Context ctx = Context.newBuilder("js")
                .option("engine.WarnInterpreterOnly", "false")
                .build()) {
            ctx.eval("js", "console.log('Hello World!')");
            ctx.eval("js", "print(`Now date is ${new Date().toString()}`)");
        }
    }
}
